Fix the logic of the depth one check. (#133488, Christian Persch)
authorMatthias Clasen <maclas@gmx.de>
Thu, 5 Feb 2004 20:35:57 +0000 (20:35 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 5 Feb 2004 20:35:57 +0000 (20:35 +0000)
Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
of the depth one check.  (#133488, Christian Persch)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index c0b7093b357eebfe71defcb948c84566749ac585..ac3f1ef5e493be6898701aa45129a48a3dc0b28e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
+       of the depth one check.  (#133488, Christian Persch)
+
 Thu Feb  5 01:50:19 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix
index c0b7093b357eebfe71defcb948c84566749ac585..ac3f1ef5e493be6898701aa45129a48a3dc0b28e 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
+       of the depth one check.  (#133488, Christian Persch)
+
 Thu Feb  5 01:50:19 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix
index c0b7093b357eebfe71defcb948c84566749ac585..ac3f1ef5e493be6898701aa45129a48a3dc0b28e 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
+       of the depth one check.  (#133488, Christian Persch)
+
 Thu Feb  5 01:50:19 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix
index c0b7093b357eebfe71defcb948c84566749ac585..ac3f1ef5e493be6898701aa45129a48a3dc0b28e 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
+       of the depth one check.  (#133488, Christian Persch)
+
 Thu Feb  5 01:50:19 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix
index c0b7093b357eebfe71defcb948c84566749ac585..ac3f1ef5e493be6898701aa45129a48a3dc0b28e 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb  5 21:36:43 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic
+       of the depth one check.  (#133488, Christian Persch)
+
 Thu Feb  5 01:50:19 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix
index 248a1824b4ed4d8ea515127fb5ebd0416a2616bf..eef5ea6f83fbdb002afe93d8879ff5e70c8a4d62 100644 (file)
@@ -255,6 +255,10 @@ static void     gtk_combo_box_cell_layout_clear_attributes   (GtkCellLayout
 static void     gtk_combo_box_cell_layout_reorder            (GtkCellLayout         *layout,
                                                               GtkCellRenderer       *cell,
                                                               gint                   position);
+#if 1
+static gboolean gtk_combo_box_mnemonic_activate              (GtkWidget    *widget,
+                                                             gboolean      group_cycling);
+#endif
 
 
 GType
@@ -317,6 +321,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
   widget_class->size_request = gtk_combo_box_size_request;
   widget_class->expose_event = gtk_combo_box_expose_event;
   widget_class->scroll_event = gtk_combo_box_scroll_event;
+  widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
 
   object_class = (GObjectClass *)klass;
   object_class->set_property = gtk_combo_box_set_property;
@@ -2599,7 +2604,8 @@ gtk_combo_box_get_active_iter (GtkComboBox     *combo_box,
  * @combo_box: A #GtkComboBox
  * @iter: The #GtkTreeIter.
  * 
- * Sets the current active item to be the one referenced by @iter.
+ * Sets the current active item to be the one referenced by @iter. 
+ * @iter must correspond to a path of depth one.
  * 
  * Since: 2.4
  **/
@@ -2613,7 +2619,7 @@ gtk_combo_box_set_active_iter (GtkComboBox     *combo_box,
 
   path = gtk_tree_model_get_path (gtk_combo_box_get_model (combo_box), iter);
   g_return_if_fail (path != NULL);
-  g_return_if_fail (gtk_tree_path_get_depth (path) != 1);
+  g_return_if_fail (gtk_tree_path_get_depth (path) == 1);
   
   gtk_combo_box_set_active (combo_box, gtk_tree_path_get_indices (path)[0]);
   gtk_tree_path_free (path);
@@ -2822,3 +2828,15 @@ gtk_combo_box_remove_text (GtkComboBox *combo_box,
                                      NULL, position))
     gtk_list_store_remove (store, &iter);
 }
+
+
+#if 1
+static gboolean
+gtk_combo_box_mnemonic_activate (GtkWidget *widget,
+                                gboolean   group_cycling)
+{
+  g_print ("I'm here!\n");
+  gtk_widget_grab_focus (GTK_COMBO_BOX (widget)->priv->tree_view);
+  return TRUE;
+}
+#endif